/* @flow */

import { identity, resolveAsset } from 'core/util/index'

/**
 * 调用该函数查找过滤器
 * 找到返回过滤器，否则返回 identity
 */
export function resolveFilter (id: string): Function {
  return resolveAsset(this.$options, 'filters', id, true) || identity
}
